class VideoDataModel {
  VideoDataModel({
    required this.id,
    required this.title,
    required this.fengImage,
    required this.tags,
    required this.bmNum,
    required this.subtitle,
    required this.price,
    required this.payType,
    required this.sort,
    required this.videofile,
    required this.tagsStr,
  });
  late final int id;
  late final String title;
  late final String fengImage;
  late final List<String> tags;
  late final int bmNum;
  late final String subtitle;
  late final int price;
  late final String payType;
  late final int sort;
  late final String videofile;
  late final String tagsStr;

  VideoDataModel.fromJson(Map<String, dynamic> json){
    id = json['id'];
    title = json['title'];
    fengImage = json['feng_image'];
    tags = List.castFrom<dynamic, String>(json['tags']);
    bmNum = json['bm_num'];
    subtitle = json['subtitle'];
    price = json['price'];
    payType = json['pay_type'];
    sort = json['sort'];
    videofile = json['videofile'];
    tagsStr = json['tags_str'];
  }

  static List<VideoDataModel> fromList(List json){
    return List.from(json).map((e) => VideoDataModel.fromJson(e)).toList();
  }

  Map<String, dynamic> toJson() {
    final _data = <String, dynamic>{};
    _data['id'] = id;
    _data['title'] = title;
    _data['feng_image'] = fengImage;
    _data['tags'] = tags;
    _data['bm_num'] = bmNum;
    _data['subtitle'] = subtitle;
    _data['price'] = price;
    _data['pay_type'] = payType;
    _data['sort'] = sort;
    _data['videofile'] = videofile;
    _data['tags_str'] = tagsStr;
    return _data;
  }
}